import request from '@/utils/request'

// 查询报警数据列表
export function listAlarmRecord(query) {
  return request({
    url: '/alarm/alarmRecord/list',
    method: 'get',
    params: query,
  })
}

// 查询历史报警数据列表
export function historyListAlarmRecord(query) {
  return request({
    url: '/alarm/alarmRecord/history/list',
    method: 'get',
    params: query,
  })
}

// 查询报警数据详细
export function getAlarmRecord(id) {
  return request({
    url: `/alarm/alarmRecord/${id}`,
    method: 'get',
  })
}

// 新增报警数据
export function addAlarmRecord(data) {
  return request({
    url: '/alarm/alarmRecord',
    method: 'post',
    data: data,
  })
}

// 修改报警数据
export function updateAlarmRecord(data) {
  return request({
    url: '/alarm/alarmRecord',
    method: 'put',
    data: data,
  })
}

// 删除报警数据
export function delAlarmRecord(id) {
  return request({
    url: `/alarm/alarmRecord/${id}`,
    method: 'delete',
  })
}
